<?php
declare (strict_types = 1);
namespace app\api\controller;
use app\api\BaseController;
use Firebase\JWT\JWT;
use Firebase\JWT\Key;
use think\facade\Db;
use think\facade\Request;

class Meaasge extends BaseController
{
	protected $middleware = [
    	
    ];
	// 留言表单提交
	public function index(){
		if(request()->isPost()){
			// 获取全部数据
			$param = $this->request->param();
			$result=Db::name('message')->insert($param);
			if($result){
				return json[('code'=>200,'msg'=>'提交成功')];
			}else{
				return json[('code'=>400,'msg'=>'提交失败')];
			}
		}
		
	}

}
